Skip to content

http oracle partial update put#1471

Open
omursahin wants to merge 5 commits intomasterfrom
oracle-partial-update-put
Open

http oracle partial update put#1471
omursahin wants to merge 5 commits intomasterfrom
oracle-partial-update-put

Conversation

@omursahin
Copy link
Copy Markdown
Collaborator

No description provided.

@omursahin omursahin requested a review from arcuri82 April 3, 2026 07:24
* PUT /path -> 2xx (successful update/create with body B)
* GET /path -> 2xx (must return exactly the fields that were PUT)
*
* Returns true if any field sent in the PUT body has a different value
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is partial. you need also to check that GET is not returning fields not used in the PUT. or, if those are returned, if they are null

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, need to check the differences in what declared in the schema, eg, the resource might have fields that are not supposed to be changed via a PUT (eg timestamps or ids)

val putBody = extractRequestBody(put)
val getBody = resGet.getBody()

if (putBody.isNullOrEmpty() || getBody.isNullOrEmpty()) return false
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if putBody is empty, but getBody is not, then we got a bug


if (putBody.isNullOrEmpty() || getBody.isNullOrEmpty()) return false

val fieldNames = extractModifiedFieldNames(put)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it should rather check the field names of what declared in the schema of the PUT. i have added some more discussion and examples to 2026/httporacles/notes.txt

* Sequence checked:
* PUT /X body=B -> 2xx
* GET /X -> response body must match exactly B
* (no field from a previous state should bleed through)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see updated discussion at 2026/httporacles/notes.txt

@Test
fun testRunEM() {

runTestHandlingFlakyAndCompilation(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if best in a E2E or an integration test, but check to verify the example discussed in 2026/httporacles/notes.txt, especially making sure that K does not lead to flag a fault (ie false positive)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants